<!--
  描述：产品组详情页
  @author tanghongjun
  @since 2020-08-19 11:18:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss2">
    <title>新增或编辑照片</title>
</head>
<body>

<div class="layui-fluid">

    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="channelId" th:value="${obj.channelId}"/>
            <input type="hidden" name="id" th:value="${obj.relateId}"/>

            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">照片项目：</label>
                <div class="layui-input-inline" style="width:200px">
                    <select name="pictureType" lay-search lay-verify="required">
                        <option value=""></option>
                        <option th:each="pictureType:${pictureTypes}" th:value="${pictureType.code}"
                                th:selected="${pictureType.code == obj.pictureType}" th:text="${pictureType.name}"/>
                    </select>
                </div>
            </div>
            <!--服务分类-->
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">服务分类：</label>
                <div class="layui-input-inline" style="width:200px">
                    <div id="servCategId"></div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">张数：</label>
                <div class="layui-input-inline" style="width:200px">
                    <select name="pictureNumber" lay-search lay-verify="required">
                        <option value=""></option>
                        <option value="1" th:selected="${obj.pictureNumber == 1}">1</option>
                        <option value="2" th:selected="${obj.pictureNumber == 2}">2</option>
                        <option value="3" th:selected="${obj.pictureNumber == 3}">3</option>
                        <option value="4" th:selected="${obj.pictureNumber == 4}">4</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">业务类型:</label>
                <div class="layui-input-inline" style="width: 380px">
                    <input type="radio" name="bizType" value="1" title="C-保外业务"
                           th:checked="${obj.bizType == 1||obj.bizType ==null}">
                    <input type="radio" name="bizType" value="2" title="F-保内业务" th:checked="${obj.bizType == 2}">
                    <input type="radio" name="bizType" value="3" title="B-工程业务" th:checked="${obj.bizType == 3}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">后台审核:</label>
                <div class="layui-input-inline" style="width: 300px">
                    <input type="radio" name="auditFlag" value="2" title="审核"
                           th:checked="${obj.auditFlag == 2||obj.auditFlag ==null}">
                    <input type="radio" name="auditFlag" value="1" title="不审核"
                           th:checked="${obj.auditFlag == 1}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">自动审核:</label>
                <div class="layui-input-inline" style="width: 300px">
                    <input type="radio" name="autoAuditFlag" value="2" title="开启"
                           th:checked="${obj.autoAuditFlag == 2||obj.autoAuditFlag ==null}">
                    <input type="radio" name="autoAuditFlag" value="1" title="关闭"
                           th:checked="${obj.autoAuditFlag == 1}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">必传:</label>
                <div class="layui-input-inline" style="width: 300px">
                    <input type="radio" name="requiredFlag" value="2" title="必传"
                           th:checked="${obj.requiredFlag == 2||obj.requiredFlag ==null}">
                    <input type="radio" name="requiredFlag" value="1" title="非必传"
                           th:checked="${obj.requiredFlag == 1}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">示例图片：</label>
                <div class="layui-upload-drag" id="pictureSrc">
                    <input type="hidden" id="pictureSrcValue" name="pictureSrc">
                    <i class="layui-icon"></i>
                    <p>点击上传</p>
                </div>
                <div class="layui-inline" style="width: 200px;">
                    <i onclick="previewImg('pictureSrcValue')" class="layui-icon layui-icon-search btn-review"></i>
                    <br>
                    <br>
                    <i onclick="deleteImg('pictureSrc')" class="layui-icon layui-icon-delete btn-del funcClass"></i>
                </div>
                <div class="layui-input-inline" style="margin-left: 152px;width: 240px;">
                    <span style="color: #9F9F9F;">示例图片，仅用于展示，没有可不上传</span>
                </div>
                <div class="layui-input-inline" style="margin-left: 152px;width: 260px;">
                    <span style="color: red;">(格式支持：jpg或jpeg，上传照片需< 4M)</span>
                </div>
            </div>


            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit"
                                th:if="${#authPermit.checkPermit('/channel/workorder/picture/addEdit.action')}">保存
                        </button>
                        <button class="layui-btn layui-btn-primary" onclick="cancel()" id="cancleBtn">
                            取消
                        </button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        obj: [[${obj}]],
        servCategories: [[${servCategories}]]
    };


    layui.config({
        base: "/static/lay/",
        version: "202008201436"
    }).extend({
        index: "lib/index",
        channel_workorder_picture_detail: "channel/workorder/picture/zmn.plat.channel.workorder.picture.edit",
    }).use(['index', 'channel_workorder_picture_detail']);

</script>
</body>
</html>